package cn.diancan.model.types;

import java.util.ArrayList;
import java.util.List;

/**
 * 血型
 * @author Sky
 *
 */
public class BloodType {

    private Integer id;
    private String typeName; 
    
    public List<BloodType> allBloodType(){
	List<BloodType> list = new ArrayList<BloodType>(); 
	list.add(new BloodType(1,  "A型"));
	list.add(new BloodType(2,  "B型"));
	list.add(new BloodType(3,  "O型"));
	list.add(new BloodType(4,  "AB型"));
	list.add(new BloodType(5,  "其他"));
	return list;
    }
    
    public static Integer checkId(Integer id){
	if(null == id){
	    return 5;
	}
	if(id<1 || id>5){
	    return 5;
	}
	return id;
    }
    
    
    public BloodType(Integer id, String typeName) { 
	this.id = id;
	this.typeName = typeName;
    }
    public BloodType() { 
    }
    public Integer getId() {
        return id;
    }
    public void setId(Integer id) {
        this.id = id;
    }
    public String getTypeName() {
        return typeName;
    }
    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }
    
}
